| Dua Ali

Pre-Validation Plug-In

Pre-Image vs Post-Image Plugins

These plugins run outside of the database transaction and before the main system function. Before validation, pre-validation is performed. You can also change values at this point, however this is usually done before the procedure. You will not have a record GUID if you are creating a record because the record has not yet been created. It enables to validate a form before creating a record.

Below is an example that how we can validate a form before executing database operation on it.

Pre-Image vs Post-Image Plugins

The above code suggests that we have to validate a form by its date. The date should be later than the present time. If a user enters an invalid date, the system will throw an error.

Pre-Image vs Post-Image Plugins

After signing and build our plug-in class library. We will open plug-in registration tool and click on register.

Pre-Image vs Post-Image Plugins

After selecting .dll file of our plug-in, we will click on Register Selected Plugins.

Pre-Image vs Post-Image Plugins

Now right-click on the plug-in and register a new step.

Pre-Image vs Post-Image Plugins

  1. Write the name of the event on which we have to invoke our plug-in. In our scenario, we want to invoke the plug-in on the creation of the new record (when the user will click on save button of the form).
  2. Enter the name of the primary entity which is the logical name of the entity.
  3. Select the event stage of the execution pipeline. Here we have selected PreValidation because we have to perform validation before any database operation.

Pre-Image vs Post-Image Plugins

As our plug-in has been registered, we will now open the form and input into the mandatory fields. In the above image, user has entered the time which has already been passed and then tried to create a record.

Pre-Image vs Post-Image Plugins

As per the logic of the code, the system has generated an error before creating a new record. In this way we can apply custom logics for validation.

Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.



About The Blog

Stay updated with what is happening in the Microsoft Business Applications world and initiatives Imperium is taking to ease digital transformation for customers.


More About Us

We provide guidance and strategic oversight to C-Suite and IT Directors for on-going implementations. Feel free to give us a call.

1 331 250 27 17
Send A Message

Ready to Start?

Get a personalized consultation for your project.

Book a Meeting